package com.cbs.android.module.discussion;

import com.cbs.android.component.share.shareinterface.ShareInterface;
import com.cbs.android.module.discussion.extension.SimpleDateFormatter;


/**
 * Created by broche on 1/11/16.
 */
public class DiscussionModule {
    private static boolean debug = false;
    private static ImagePathTranslator pathTranslator = null;
    private static DateFormatter dateFormatter = new SimpleDateFormatter();
    private static ShareInterface shareService = null;

    public static boolean isDebug() {
        return debug;
    }

    public static void setDebug(boolean debug) {
        DiscussionModule.debug = debug;
    }

    public static String getAvatarPath(String imagePath) {
        if (pathTranslator == null) {
            return imagePath;
        } else {
            return pathTranslator.avatarPath(imagePath);
        }
    }

    public static void setImagePathTranslator(ImagePathTranslator translator) {
        pathTranslator = translator;
    }

    public static DateFormatter getDateFormatter() {
        return dateFormatter;
    }

    public static void setDateFormatter(DateFormatter dateFormatter) {
        DiscussionModule.dateFormatter = dateFormatter;
    }

    public static ShareInterface getShareService() {
        return shareService;
    }

    public static void setShareService(ShareInterface shareService) {
        DiscussionModule.shareService = shareService;
    }
}
